Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perf improve for Intel MTL CPUs #19379

Closed
wants to merge 11 commits into from
Closed

Perf improve for Intel MTL CPUs #19379

wants to merge 11 commits into from

Conversation

snnn
Copy link
Member

@snnn snnn commented Feb 1, 2024

Description

This PR copies the code that was added in #18384 to the core framework.

AB#22668

Motivation and Context

Intel's latest mobile platform CPU added a new type CPU cores: SoC cores. The SoC cores are very low performance, but highly power efficient. By default when ONNX Runtime creates a thread pool, it creates one thread for each CPU core. I was told by an Intel engineer that if we exclude the SoC core from computing the number of threads, ONNX Runtime's performance will be significantly improved. Hence this change was made. The two files hardware_core_enumerator.h and hardware_core_enumerator.cc were not written by me. They are the major part of this change. The code in the two files tries to detect if a CPU core is a SoC core in an indirect way: supposedly every Intel CPU should have three levels of cache, if a core only has two levels of cache, it must be a SoC core.

@snnn snnn requested a review from pranavsharma February 1, 2024 23:05
@pranavsharma
Copy link
Contributor

Let's not merge this to main. We'll give a nightly build to Intel from this branch to verify and then discuss with them today about next steps.

@snnn snnn marked this pull request as draft February 1, 2024 23:15
@snnn snnn changed the title Perf improve for Intel SoC [DO NOT MERGE] Perf improve for Intel SoC Feb 5, 2024
@snnn snnn changed the title [DO NOT MERGE] Perf improve for Intel SoC Perf improve for Intel MTL CPUs Feb 8, 2024
@snnn
Copy link
Member Author

snnn commented Feb 8, 2024

Because I cannot verify the code change on the hardware our team has, I am waiting feedback from Intel.

@snnn snnn closed this Feb 8, 2024
@snnn snnn deleted the snnn/perf_improve branch February 8, 2024 20:54
@snnn
Copy link
Member Author

snnn commented Feb 8, 2024

I will create a new PR if Intel told me the change was good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants